<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Document</title>
    <link rel="stylesheet" href="./template/css/bootstrap.css">
    <link rel="stylesheet" href="./template/css/bootstrap-theme.css">
    <link rel="stylesheet" href="./template/css/buttons.css">
    <link rel="stylesheet" href="./template/css/main.css">
</head>
<body role="document" >
<nav class="navbar navbar-default navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle ="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="">我的留言板</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li role="presentation">
                        <a href="">
                            留言数量
                            <span class="badge">
                                <?php
                                    echo count($arry);
                                ?>
                            </span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
</nav>
<div class="container theme-showcase" role="main">
    <div class="row">
        <div class="col-sm-12">
            <div class="list-group wy">
                <?php
                    foreach($arry as $k => $i){
                ?>
                <li class="list-group-item">
                    <h4 class="list-group-item-heading"><?php echo $i["name"]; ?></h4>
                    <p class="list-group-item-text"><?php echo $i["neirong"]; ?>
                        <div class="wyy">
                            <a href="alter.php?id=<?php
                                    echo $k;
                            ?>" class="button button-glow button-border button-action button-tiny">修改</a>
                    <a href="delete.php?id=<?php
                                    echo $k;
                            ?>" class="button button-glow button-border button-caution button-tiny">删除</a>
                    </div>
                    </p>

                </li>
                <?php
                    }
                ?>
            </div>
        </div>
        <form class="form-inline" method="post" action="./index.php">
                <div class="col-sm-12">
                    <div class="form-group">
                        <label for="exampleInputName2">昵称：</label>
                        <input type="text" class="form-control" id="exampleInputName2" placeholder="请输入你的昵称" name="name">
                    </div>
                    <input type="submit" class="button button-glow button-rounded button-raised button-primary button-small" value="发布">
                </div>
                <div class="col-sm-12">
                    <textarea class="form-control message" rows="5" name="neirong"></textarea>
                </div>
        </form>
    </div>
</div>

<script src="./template/js/jquery-1.11.3.js"></script>
<script src="./template/js/bootstrap.js"></script>
<script src="./template/js/main.js"></script>
</body>
</html>